import os
from langchain_openai import OpenAI
# 导入需要的模块和类
from langchain.prompts.example_selector import SemanticSimilarityExampleSelector
from langchain.vectorstores import Chroma
from langchain_openai import OpenAIEmbeddings
from langchain.prompts import FewShotPromptTemplate, PromptTemplate

# 国内代理方式
llm = OpenAI(
    api_key = "sk-y7DHfp9fzuCxOVm2158638099f9541D3833aB4F4Ed674aCf",
    base_url = "https://vip.apiyi.com/v1",    # 此处代理方式，如果是OpenAI官方接口需调整接口地址
    model = "gpt-3.5-turbo-instruct"
)

res = llm.invoke("Tell me a joke")

print(res)